package com.example.administrator.liangcang.store.bean.home;

import android.databinding.ObservableInt;
import android.support.v4.view.PagerAdapter;

import com.example.administrator.liangcang.BR;
import com.example.administrator.liangcang.R;
import com.example.administrator.liangcang.until.CommentPagerAdapter;
import com.google.gson.annotations.Expose;

import java.util.List;

/**
 * Created by Administrator on 2017/2/8.
 */
public class ListEntity {
    private int slide_id;
    private int content_type;
    private int content_id;
    private String pic_url;
    private String title;
    private String sub_title;
    private int order_num;
    private int home_id;
    private int home_type;
    private List<Banners> list;
    private ContentEntity one;
    private ContentEntity two;
    private ContentEntity three;
    private ContentEntity four;

    @Expose(serialize = false, deserialize = false)
    private PagerAdapter adapter;

    @Expose(serialize = false, deserialize = false)
    private ObservableInt currentPage = new ObservableInt(0);

    public PagerAdapter getAdapter() {
        if (adapter == null) {
            adapter = new CommentPagerAdapter<>(list, R.layout.store_home_banners_item, BR.banner);
        }
        return adapter;
    }

    public void setAdapter(PagerAdapter adapter) {
        this.adapter = adapter;
    }

    public ObservableInt getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(ObservableInt currentPage) {
        this.currentPage = currentPage;
    }

    public int getSlide_id() {
        return slide_id;
    }

    public void setSlide_id(int slide_id) {
        this.slide_id = slide_id;
    }

    public int getContent_type() {
        return content_type;
    }

    public void setContent_type(int content_type) {
        this.content_type = content_type;
    }

    public int getContent_id() {
        return content_id;
    }

    public void setContent_id(int content_id) {
        this.content_id = content_id;
    }

    public String getPic_url() {
        return pic_url;
    }

    public void setPic_url(String pic_url) {
        this.pic_url = pic_url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSub_title() {
        return sub_title;
    }

    public void setSub_title(String sub_title) {
        this.sub_title = sub_title;
    }

    public int getOrder_num() {
        return order_num;
    }

    public void setOrder_num(int order_num) {
        this.order_num = order_num;
    }

    public int getHome_id() {
        return home_id;
    }

    public void setHome_id(int home_id) {
        this.home_id = home_id;
    }

    public int getHome_type() {
        return home_type;
    }

    public void setHome_type(int home_type) {
        this.home_type = home_type;
    }

    public List<Banners> getList() {
        return list;
    }

    public void setList(List<Banners> list) {
        this.list = list;
    }

    public ContentEntity getOne() {
        return one;
    }

    public void setOne(ContentEntity one) {
        this.one = one;
    }

    public ContentEntity getTwo() {
        return two;
    }

    public void setTwo(ContentEntity two) {
        this.two = two;
    }

    public ContentEntity getThree() {
        return three;
    }

    public void setThree(ContentEntity three) {
        this.three = three;
    }

    public ContentEntity getFour() {
        return four;
    }

    public void setFour(ContentEntity four) {
        this.four = four;
    }
}


/*
*  "home_id": "17",
    "home_type": "4",
    "order_num": "14",
    "one": {
        "home_id": "17",
        "content_type": "1",
        "content_id": "1729",
        "pic_url": "http://7qn7hi.com1.z0.glb.clouddn.com/ware/orig/2/26/26064.jpg",
        "pic_type": "jpg",
        "pos": "1",
        "topic_name": "13款精选全球的小众香氛蜡烛，为你点亮情人节之夜",
        "topic_url": "http://www.iliangcang.com/i/topicapp/201702031835"
    },
    "two": {
        "home_id": "17",
        "content_type": "2",
        "content_id": "707",
        "pic_url": "http://7qn7hi.com1.z0.glb.clouddn.com/ware/orig/2/26/26065.jpg",
        "pic_type": "jpg",
        "pos": "2",
        "topic_name": "",
        "topic_url": ""
    },
    "three": {
        "home_id": "17",
        "content_type": "2",
        "content_id": "715",
        "pic_url": "http://7qn7hi.com1.z0.glb.clouddn.com/ware/orig/2/26/26063.jpg",
        "pic_type": "jpg",
        "pos": "3",
        "topic_name": "",
        "topic_url": ""
    },
    "four": {
        "home_id": "17",
        "content_type": "1",
        "content_id": "1732",
        "pic_url": "http://7qn7hi.com1.z0.glb.clouddn.com/ware/orig/2/26/26067.jpg",
        "pic_type": "jpg",
        "pos": "4",
        "topic_name": "85折福利 | 情人节限定永生花香氛蜡烛礼盒，送给限定的她",
        "topic_url": "http://www.iliangcang.com/i/topicapp/201702040621"
    }
* */